package com.second.hand.trading.server.dao;

import com.second.hand.trading.server.model.SalesmanModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SalesmanDao {
    int deleteByPrimaryKey(Long id);

    int insert(SalesmanModel record);

    int insertSelective(SalesmanModel record);

    SalesmanModel salesmanLogin(@Param("accountNumber") String accountNumber, @Param("salesmanPassword") String userPassword);

    SalesmanModel selectByPrimaryKey(Long id);

    List<SalesmanModel> getSalesmanList(int begin,int nums);

    List<SalesmanModel> findSalesmanByList(List<Long> idList);

    List<SalesmanModel> getNormalSalesman(int begin, int nums);

    List<SalesmanModel> getBanSalesman(int begin, int nums);

    int countNormalSalesman();

    int countBanSalesman();

    int updateByPrimaryKeySelective(SalesmanModel record);

    int updateByPrimaryKey(SalesmanModel record);

    int updatePassword(@Param("newPassword") String newPassword,
                       @Param("oldPassword") String oldPassword,@Param("id") Long id);
}